﻿Public Class clsTmj
    Dim objClsTask As New clsTask
    Public Function selectTmj() As DataTable
        Dim szSql As String = ""
        szSql &= "SELECT * FROM agv.tmj where tmj_received_write=true and agv <> 0 and agv_start2 is null "
        szSql &= "order by sys_id desc limit 1 "
        Dim dt As DataTable = DBacs.ExecuteSql(szSql)
        If IsNothing(dt) Then
            selectTmj = New DataTable
        Else
            selectTmj = dt
        End If
    End Function

    Public Function update_agv_start2(agv_start2 As Integer, id As String) As Integer
        Dim szSql As String = String.Empty
        Dim rtn As Integer
        szSql &= "update agv.tmj set agv_start2 = ?, agv_start2_time = (SELECT CURRENT_TIMESTAMP(6)) where task_id = ?"
        rtn = DBacs.ExecuteUpdateSql(szSql, -1, agv_start2, id)
        Return rtn
    End Function
End Class

Public Class entity_task_record
    Public sys_id As String
    Public type As String
    Public prod_id As String
    Public status As String
    Public start_time As String
    Public end_time As String
    Public update_time As String
    Public tm As String
    Public lhj As String
    Public prod_spec_id As String
End Class

Public Class entity_task_step_record
    Public sys_id As String
    Public prio As String
    Public pick As String
    Public drop As String
    Public agv As String
    Public task_id As String
    Public status As String
    Public prod_id As String
    Public previous_id As String
    Public update_time As String
    Public lhj As String
    Public prod_spec_id As String
End Class
